<html>
<head><meta charset="utf-8"><title>Snippets broken · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Snippets.20broken.html">Snippets broken</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="198601941"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Snippets%20broken/near/198601941" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Snippets.20broken.html#198601941">(May 24 2020 at 21:52)</a>:</h4>
<p>Since a couple of days I keep getting weirdly formatted functions after applying "add missing impl members":</p>
<div class="codehilite"><pre><span></span><code><span class="w">    </span><span class="n">fntcx</span><span class="o">&lt;</span><span class="w"> </span><span class="na">&#39;a</span><span class="o">&gt;</span><span class="p">(</span><span class="o">&amp;</span><span class="w"> </span><span class="na">&#39;aself</span><span class="p">)</span>-&gt;<span class="nc">TyCtxt</span><span class="o">&lt;</span><span class="w"> </span><span class="na">&#39;tcx</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="n">todo</span><span class="o">!</span><span class="p">()</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
</code></pre></div>


<p>Is that a known bug? I would have expected the tests to catch this, so maybe it's a local issue? Has someone seen this before?</p>



<a name="198602162"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Snippets%20broken/near/198602162" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Snippets.20broken.html#198602162">(May 24 2020 at 21:57)</a>:</h4>
<p>You might want to rebuild vscode extension from master, we‘ve changed our<br>
approach to snippets, and there were couple of regressions, which were<br>
fixed (unless this is a regression introduced by the said fixes) mp</p>



<a name="198602401"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Snippets%20broken/near/198602401" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Snippets.20broken.html#198602401">(May 24 2020 at 22:03)</a>:</h4>
<p>Hmm, same behavior on master</p>



<a name="198640527"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Snippets%20broken/near/198640527" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Snippets.20broken.html#198640527">(May 25 2020 at 07:18)</a>:</h4>
<p>Yeah, tried this today, can't reproduce... This seems like something is wrong on the client side, and it is handled here now:</p>
<p><a href="https://github.com/rust-analyzer/rust-analyzer/blob/fbb8b884a2dbc3ced720c84f4604466e223f6d69/editors/code/src/commands/index.ts#L67-L90">https://github.com/rust-analyzer/rust-analyzer/blob/fbb8b884a2dbc3ced720c84f4604466e223f6d69/editors/code/src/commands/index.ts#L67-L90</a></p>
<p>Although, I must say I cannot fathom what might cause us to misplace whitespace .....</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>